1. Field of the Invention
The present invention relates to a data server system for transferring video data or audio data.
2. Prior Art
In conventional video server systems, a plurality of computers are interconnected using a network. Each computer receives and reproduces video (or audio) in real time according to video (or audio) data received from another computer. Depending on the method used to transfer data, such systems can be classified into xe2x80x9cpush-typexe2x80x9d systems and xe2x80x9cpull-typexe2x80x9d systems.
In a pull-type video server system, the transmitting computer (hereafter, xe2x80x9ctransmitterxe2x80x9d) receives transfer requests (control data) from a receiving computer (hereafter, xe2x80x9creceiverxe2x80x9d), and transmits video data to the receiver. The receiver receives this video data and uses it to reproduce video. On the other hand, in a push-type video server system, the transmitter transmits video data to the receiver using a certain cycle. The receiver reproduces video in synchronization with this cycle. Note that while this specification refers to xe2x80x9cvideo dataxe2x80x9d, the same techniques can be used to transfer audio data or a combination of video and audio data.
The following describes a pull-type video server system and a push-type video server system in detail with reference to FIGS. 1xcx9c5 and FIGS. 6xcx9c9, respectively.
FIG. 1 is a block diagram showing the overall construction of a computer that can be used to construct a conventional pull-type video server system, while FIG. 2 shows the transmission and reception of video data in a pull-type video server system. In this example, computers 500 and 600 are both equipped with the same functions, including transmission and reception functions for video data.
As shown in FIG. 1, the present video server system includes computer 500, computer 600, and network 550. The computers 500 and 600 are connected via the network 550. The computer 500 includes a video data receiving unit 501, a reception buffer 502, a request receiving unit 503, a video data transmitting unit 504, a magnetic disc drive device 505, and a request transmitting unit 506. In this description, the corresponding functions of the computer 600 are given corresponding reference numerals, as shown in FIG. 2.
The following describes the transfer of video data with the computer 600 as the receiver and the computer 500 as the transmitter. As shown in FIG. 2, the request transmitting unit 606 of the receiver 600 first transmits a transfer request to the request receiving unit 503 of the transmitter 500 via the network 550 and the reception buffer 502 of the transmitter 500. This transfer request has a predetermined format, and requests the transfer of a video data block (the video data being stored having been divided in a predetermined manner into a plurality of blocks) that forms part of the video data corresponding to the video images desired by the user of receiver 600.
In the transmitter 500, the request receiving unit 503 that received the transfer request gives instructions to the video data transmitting unit 504. The video data transmitting unit 504 reads the video data block corresponding to the transfer request from the magnetic disc drive device 505 and transfers the read video data block to the reception buffer 602 of the receiver 600.
In the receiver 600, the video data receiving unit 601 reproduces the video data that has been transferred to the reception buffer 602. At the same time, the request transmitting unit 606 transmits another transfer request to the request receiving unit 503 of the transmitter 500 so that the next video data block can be received.
The transmitter 500 and the receiver 600 in present video server system repeatedly perform the operations described above, and so transfer and reproduce video data.
In this kind of pull-type video server system, the request transmitting unit 606 monitors the expendable amount of data in the reception buffer 602 and adjusts the timing at which it transmits transfer requests to the transmitter 500 to ensure that underflows and overflows of video data do not occur in the reception buffer 602. Here, xe2x80x9cexpendable dataxe2x80x9d refers to data in the reception buffer 602 that is yet to be reproduced. In this system, transfer requests are transmitted from the receiver 600 to the transmitter 500 until it appears that an overflow may occur in the reception buffer 602, so that the receiver 600 will continue to receive video data. When it appears that the further reception of video data may cause an overflow in the reception buffer 602, the request transmitting unit 606 temporarily stops transmitting transfer requests and thereby ensures that no overflow will occur.
The following describes the control procedures performed by the transmitter 500 and the receiver 600 to transfer video data in this way, and the changes in the amount of expendable data in the reception buffer 602 due to this control. This description refers to FIGS. 3xcx9c5.
FIG. 3 is a flowchart showing the control procedure when the receiver 600 in a pull-type video server system (see FIG. 2) receives video data.
In the receiver 600, a request is first received from the user and the request transmitting unit 606 transmits a transfer request to the transmitter 500 (S501).
A video data block is transmitted from the transmitter 500 to the reception buffer 602 of the receiver 600 in accordance with the transfer request. The reception buffer 602 is constantly monitored by the request transmitting unit 606 that judges whether an overflow may occur in the reception buffer 602 (S502).
If an overflow appears possible (S502:Yes), the processing stops at S502. However, if an overflow does not appear possible (S502:No), it is judged whether all of the video data corresponding to the user request has been received (S503).
If the transfer of video data is complete (S503:Yes), the processing ends. If not (S503:No), the request transmitting unit 606 transmits a transfer request for the video data block following the previously received video data block to the transmitter 500 (S504).
FIG. 4 is a flowchart showing the control procedure when the transmitter 500 in a pull-type video server system (see FIG. 2) transmits video data.
When transmitting data, the transmitter 500 first waits for a transfer request to arrive from the receiver 600 (S601).
A transfer request is received from the receiver 600 while the transmitter 500 is in this wait state. The request receiving unit 503 of the receiver 500 judges whether a transfer request has been received by constantly monitoring the reception buffer 502 (S602).
If a transfer request has not been received (S602:No), the processing returns to S601 and the transmitter continues to wait for a transfer request to arrive. If a transfer request has been received (S602:Yes), the video data transmitting unit 504 transmits a video data block corresponding to the transfer request to the receiver 600 (S603).
Next, it is judged whether the transfer requested by the transfer request has been completed (S604). If not (S604:No), the processing returns to S601. If so (S604:Yes), the processing ends.
By having the receiver 600 and the transmitter 500 perform the processing shown in FIGS. 3 and 4, video data can be transferred while the amount of expendable data in the reception buffer 602 of the receiver 600 is monitored. This is described in more detail below.
FIG. 5 shows how the amount of expendable data in the reception buffer 602 of the receiver 600 changes over time when video data is transferred in the above pull-type video server system.
Video data is transmitted from the transmitter 500 to the receiver 600 in accordance with transfer requests issued by the receiver 600. This video data accumulates in the reception buffer 602 (see FIG. 2) of the receiver 600 and increases the amount of expendable data in the reception buffer 602 (at times t1, t2, t3). Since the amount of expendable data in the reception buffer 602 decreases at a predetermined rate as the video data is reproduced, the amount of data in the buffer at any time corresponds to the difference between the amount of video data that has been transferred and the amount of video data that has been used (xe2x80x9cexpendedxe2x80x9d) for reproduction. While data transfer is being performed, the request transmitting unit 606 monitors the amount of expendable data in the reception buffer 602 and when a buffer overflow appears possible (at time t3), delays the transmission of the next transfer request. In this way, the request transmitting unit 606 waits for the amount of expendable data in the reception buffer 602 to decrease due to the reproduction of the video data by the video data receiving unit 601. Once the amount of expendable data has decreased sufficiently, the request transmitting unit 606 transmits another transfer request, and the transferred video data is received as normal (at time t4).
By operating as described above, underflows and overflows are prevented for the reception buffer 602 of the receiver 600 in a pull-type video server system.
The following describes a push-type video server system. FIG. 6 is a block diagram showing the overall construction of a computer that can be used in a conventional push-type video server system. FIG. 7 shows the transmission and reception of video data in this system. As in the previous example, computers 700 and 800 are both equipped with the same functions, including transmission and reception functions for video data.
As shown in FIG. 6, the present video server system includes computer 700, computer 800, and network 750. The computers 700 and 800 are connected via the network 750.
The computer 700 includes a video data receiving unit 701, a reception buffer 702, a request receiving unit 703, a video data transmitting unit 704, a magnetic disc drive device 705, and a request transmitting unit 706. In this description, the corresponding functions of the computer 800 are given corresponding reference numerals, as shown in FIG. 7.
The following describes the transfer of video data with the computer 800 as the receiver and the computer 700 as the transmitter. As shown in FIG. 7, the request transmitting unit 806 of the receiver 800 first transmits a transfer start request to the request receiving unit 703 of the transmitter 700 via the network 750 and the reception buffer 702 of the transmitter 700.
In the transmitter 700, the request receiving unit 703 that received the transfer start request gives instructions to the video data transmitting unit 704, which operates with a predetermined cycle to read the video data blocks corresponding to the transfer start request from the magnetic disc drive device 705 and to transfer the read video data blocks to the reception buffer 802 of the receiver 800.
In the receiver 800, the transferred video data blocks are received by the reception buffer 802, and the video data receiving unit 801 reproduces the video data in synchronization with the cycle with which it has been transferred.
In the present video system, the transmitter 700 begins to transfer video data at a predetermined cycle on receiving a transfer start request from the receiver 800, and the receiver reproduces the transferred video data in synchronization with this predetermined cycle.
In the push-type video server system described above, differences between the clocks used as a standard for the processing of the transmitter 700 and receiver 800 will accumulate and can cause an underflow or overflow to occur in the reception buffer 802 of the receiver 800.
One technique for preventing such underflows and overflows has the video data transmitting unit 704 of the transmitter 700 include clock information (control data) in packets that contain the video data. The video data receiving unit 801 of the receiver 800 then reproduces the video data using this clock information. A technique that reproduces video data in this way is taught by Japanese Laid-Open Patent Application H09-55767.
FIG. 8 shows the composition of a data packet used in the push-type video server system described above.
The video data blocks described above are in fact transmitted in the form of packets. Each data packet 900 includes a header 901, clock information 902, and the actual video data 903 to be reproduced. Of these, the header 901 contains information such as the packet type, packet size, and where the packet should be transmitted, while the clock information 902 is used for adjusting the timing for data reproduction by the receiver 800 (see FIG. 7).
These data packets 900 are transferred between the transmitter 700 and the receiver 800 as described below.
FIG. 9 shows how the amount of expendable data in the reception buffer 802 of the receiver 800 changes over time when video data is transferred in the above push-type video server system. Video data is transmitted from the transmitter 700 to the receiver 800 in accordance with a transfer start request issued by the receiver 800. The receiver 800 receives the video data (at times t1, t2, t3, t4) that is transmitted with the predetermined cycle and reproduces video at a predetermined rate using the clock information. As a result, there is no great variation in the amount of expendable data in the reception buffer 802, so that underflows and overflows can be avoided.
As described above, both conventional pull-type video server systems and conventional push-type video server systems transmit video data managed by the transmitter to the receiver and have the transmitted data reproduced by the receiver while ensuring that overflows and underflows do not occur in the reception buffer of the receiver.
In the pull-type video server system described above, however, the reception buffer of the receiver has to be monitored and transfer requests have to be often transmitted to the transmitter to receive video data blocks while ensuring that overflows and underflows do not occur. This frequent transmission of transfer requests makes the transmission protocol complicated and increases the amount of traffic on the network. Accordingly, the processing to ensure that underflows and overflows do not occur in the reception buffer of the receiver places an excessive load on the entire system.
On the other hand, in a push-type video server system, underflows and overflows are avoided by including clock information in the packets transmitted from the transmitter and having the receiver perform reproduction in accordance with this clock information. Such clock information has to be generated by and added to the video data by the transmitter, and the receiver needs to be equipped with a special mechanism for reproducing the data in strict accordance with the clock information. Once again, this means that the processing to ensure that underflows and overflows do not occur in the reception buffer of the receiver places an excessive load on the entire system.
In view of the stated problems, it is an object of the present invention to provide a data server system that prevents overflows and underflows from happening in the reception buffer of the receiver using a simple control procedure and without requiring a special mechanism to be provided to the transmitter. Such data server system also reduces the amount of control data used so as not to place an excessive load on a network.
The stated object can be achieved by a data server system including a data transmitting apparatus and a data receiving apparatus, the data transmitting apparatus reading at least one of video data and audio data from a storing unit and cyclically transmitting the read data in predetermined amounts via a network, and the data receiving apparatus receiving the data transmitted by the data transmitting apparatus and reproducing at least one of video and audio based on the received data, the data receiving apparatus including: a buffer memory for temporarily storing data received by the data receiving apparatus; a detecting unit for detecting whether either of underflow and an overflow appears possible in the buffer memory while the data is being received; a generating unit for generating (1) type 1 control data when the detecting unit detects that an underflow appears possible, and (2) type 2 control data when the detecting unit detects that an overflow appears possible; a transmitting unit for transmitting the type 1 control data and the type 2 control data, and the data transmitting apparatus including: a receiving unit for receiving the type 1 control data and the type 2 control data; and an adjusting unit (1) for shortening a cycle for transmitting predetermined amounts of data when the type 1 control data has been received, and (2) for lengthening a cycle for transmitting predetermined amounts of data when the type 2 control data has been received.
In the above data server system, type 1 control data is generated and transmitted whenever an underflow appears possible in the buffer memory of the data receiving apparatus during the transfer of data. Conversely, type 2 control data is generated and transmitted whenever an overflow appears possible. On receiving the type 1 control data, the data transmitting apparatus shortens the cycle for transmitting predetermined amounts of the data. Conversely, on receiving the type 2 control data, the data transmitting apparatus lengthens the cycle for transmitting predetermined amounts of the data.
In this way, control data is transmitted only when an underflow or an overflow appears possible. As a result, less control data is required, and underflows and overflows can be prevented in the reception buffer of the reception apparatus using a simple control procedure.
Here, the data receiving apparatus may further include: a request generating unit for generating request data based on a request that relates to data and is obtained from a user; and a request transmitting unit for transmitting the generated request data, and the data transmitting apparatus may further include: a request receiving unit for receiving the transmitted request data; and an indicating unit for indicating a start of a cyclical transmission of predetermined amounts of the data to which the request data relates.
In this data server system, the data receiving apparatus generates and transmits request data in accordance with a request that relates to data and is received from the user. The data transmitting apparatus receives the transmitted request data and starts to cyclically transmit data in accordance with the request data. When an underflow appears possible in the buffer memory of the data receiving apparatus during the transfer of data, type 1 control data is generated and transmitted. Conversely, type 2 control data is generated and transmitted whenever an overflow appears possible. On receiving the type 1 control data, the data transmitting apparatus shortens the cycle for transmitting predetermined amounts of the data. Conversely, on receiving the type 2 control data, the data transmitting apparatus lengthens the cycle for transmitting predetermined amounts of the data.
As a result, control data is transferred only when an underflow or overflow may occur. This reduces the required amount of control data, and means that underflows and overflows in the reception buffer can be avoided with a simple control procedure. Since data transfer is commenced in accordance with user requests, the data receiving apparatus can receive data in a manner that is favorable to users.
The stated object can also be achieved by a data server system including a data transmitting apparatus and a data receiving apparatus, the data transmitting apparatus reading at least one of video data and audio data from a storing unit and transmitting, via a network, the read data in predetermined amounts in a transmission cycle, and the data receiving apparatus receiving the data transmitted by the data transmitting apparatus and reproducing at least one of video and audio based on the data, the data receiving apparatus including: a buffer memory for temporarily storing data received by the data receiving apparatus; a detecting unit for detecting whether either of an underflow and an overflow appears possible in the buffer memory while the data is being received; a storing unit for storing a cycle for transmitting predetermined amounts of the data; an updating unit (1) for shortening the stored cycle which the detecting unit detects that an underflow appears possible, and (2) for lengthening the stored cycle when the detecting unit detects that an overflow appears possible; first generating unit for generating type 1 control data that indicates the stored cycle; a transmitting unit for transmitting the type 1 control data, and the data transmitting apparatus including: a receiving unit for receiving the type 1 control data; and an adjusting unit for adjusting the transmission cycle in accordance with the received type 1 control data.
With the present data server system, the stored value of the adjusted cycle is updated as follows. When an underflow appears possible in the buffer memory during the transfer of data, the adjusted cycle for transmitting predetermined amounts of data is shortened, while when an overflow appears possible, the adjusted cycle for transmitting predetermined amounts of data is lengthened. Control data showing this adjusted cycle is generated and transmitted. Based on this control data, the data transmitting apparatus sets the cycle for transmitting predetermined amounts of data.
Control data is transferred only when an underflow or overflow may occur. This reduces the required amount of control data, and means that underflows and overflows in the reception buffer can be avoided with a simple control procedure. When underflows and overflows are caused by a small difference between the cycle used by the data receiving apparatus to reproduce data and the cycle used by the data transmitting apparatus to transmit data, the repeated updating of the adjusted cycle described above can amend the transmission cycle of the data transmitting apparatus to match the reproduction cycle of the data receiving apparatus. This means that the transmission of control data from the data receiving apparatus will eventually become unnecessary.
Here, the data receiving apparatus may further include a second generating unit (1) for generating, when the detecting unit detects that an underflow appears possible, type 2 control data showing a predetermined cycle that is shorter than a predetermined standard, the type 2 control data being used until an amount of data in the buffer memory increases to a certain amount, and (2) for generating, when the detecting unit detects that an overflow appears possible, type 3 control data showing a predetermined cycle that is longer than a predetermined standard, the type 3 control data being used until an amount of data in the buffer memory decreases to a certain amount, wherein when the detecting unit detects that one of an overflow and an underflow appears possible, the generating unit may not generate the type 1 control data until the amount of data in the buffer memory is equal to the certain amount, and the transmitting unit may transmit one of the type 1 control data, the type 2 control data, and the type 3 control data. The receiving unit in the data transmitting apparatus may receive one of the type 1 control data, the type 2 control data, and the type 3 control data, and the adjusting unit may adjust the transmission cycle in accordance with whichever of the type 1 control data, the type 2 control data, and the type 3 control data was received by the receiving unit.
When an underflow appears possible in the buffer memory of the data receiving apparatus during the transfer of data, type 2 control data, which indicates a predetermined cycle that is shorter than a predetermined standard, is generated and transmitted by the data receiving apparatus until the amount of data in the buffer memory reaches a certain amount. At the same time, the adjusted cycle stored by the data receiving apparatus is shortened. Once the amount of data in the buffer memory reaches the certain amount, type 1 control data indicating the adjusted cycle is generated and transmitted by the data receiving apparatus.
Conversely, when an overflow appears possible in the buffer memory, type 3 control data, which indicates a predetermined cycle that is longer than a predetermined standard, is generated and transmitted by the data receiving apparatus until the amount of data in the buffer memory reaches the certain amount. At the same time, the adjusted cycle stored by the data receiving apparatus is lengthened. Once the amount of data in the buffer memory reaches the certain amount, type 1 control data indicating the adjusted cycle is generated and transmitted by the data receiving apparatus.
Control data is transferred only when an underflow or overflow may occur. This reduces the required amount of control data, and means that underflows and overflows in the reception buffer can be avoided with a simple control procedure. When underflows and overflows are caused by a small difference between the cycle used by the data receiving apparatus to reproduce data and the cycle used by the data transmitting apparatus to transmit data, the repeated updating of the adjusted cycle described above can amend the transmission cycle of the data transmitting apparatus to precisely match the reproduction cycle of the data receiving apparatus. This means that the transmission of control data from the data receiving apparatus will eventually become unnecessary.
Here, the updating unit may update the stored cycle by making a progressively smaller adjustment to the stored cycle when the detecting unit repeatedly detects that either of an underflow and an overflow appears possible.
With the stated construction, the data receiving apparatus changes the adjusted cycle using progressively smaller adjustments whenever an underflow or overflow appears possible.
This means that the transmission cycle of the data transmitting apparatus can be quickly and efficiently adjusted so as to precisely match the reproduction cycle of the data receiving apparatus. As a result, the data receiving apparatus will eventually not need to transmit control data.